package com.geekaca.exam;

import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入手机号码: ");
        String cellNumber = scanner.next();
        cellphonePrice(cellNumber);

    }

    public static void cellphonePrice(String cellNumber){
        String lastNumber = cellNumber.substring(cellNumber.length()-1);
        System.out.println(lastNumber);
        if (lastNumber.equals("8")){
            System.out.println("请支付办卡费50元");
        }else if (lastNumber.equals("4")){
            System.out.println("请支付办卡费0元");
        }else {
            System.out.println("请支付办卡费20元");
        }
    }
}
